import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

/**************************定义路由*******************************/
export default new VueRouter ({
    routes: [
        {path: '/', redirect: '/login'},
        {path: '/login', component: resolve => require(['./components/admin/login.vue'], resolve)}, //登录界面
        {
            path: '/home',
            component: resolve => require(['./components/admin/home.vue'], resolve),
            children: [
                // {path: '', redirect: '/admin-index'},
                {path: '/', redirect: '/admin-index'},
                {path: '/admin-index', name: '1-1-1', component: resolve => require(['./components/admin/sys_setting/index.vue'], resolve)}, //系统后台
                {path: '/setting-site', name: '1-1-2', component: resolve => require(['./components/admin/sys_setting/setting_site.vue'], resolve)}, //站点设置
                {path: '/admins-list', name: '1-2-1', component: resolve => require(['./components/admin/sys_setting/admins.vue'], resolve)}, //管理员列表
            ]}
    ]
})

